#include "UI\MainWindow.h"
#include "resource.h"

int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow) 
{
	CMainWindow win;

	if (!win.Create(hInst, "Scrabble v2011", WS_OVERLAPPED | WS_SYSMENU, 0, 900, 768, IDR_MENU1 ))
	{
		return 0;
	}

	  
	ShowWindow(win.Window(), nCmdShow);

	// Run the message loop.

	MSG msg = { };
	while (GetMessage(&msg, NULL, 0, 0))
	{
		if(TranslateAccelerator(win.Hwnd(),  win.HAccel() ,&msg) == 0 ){	
		TranslateMessage(&msg);
		DispatchMessage(&msg);
	}
	}

	return 0;
}